﻿using System.Xml.Linq;
using IcicleFramework.Components.Actions;

namespace IcicleFramework.GameServices
{
    public interface IActionFactory : IService
    {
        /// <summary>
        /// Creates a new <see cref="IAction"/> using the information provided in the <see cref="XElement"/>.
        /// </summary>
        /// <param name="element">The <see cref="XElement"/> containing the information required for this <see cref="IAction"/>.</param>
        /// <returns>The requested <see cref="IAction"/>, or null if not <see cref="IAction"/> could be generated from the given <see cref="XElement"/>.</returns>
        IAction GenerateAction(XElement element);
    }
}
